package com.nlgc365.designpattern.Chapter04_Pattern.Behavior.P07_Visitor.Iteration03;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 作用: 添加的新的需求类
 */
public class Compressor implements Visitor {
    private static final Logger logger = LoggerFactory.getLogger(Compressor.class);

    /**
     * 针对PDF资源的业务统一接口
     *
     * @param pdfResourceFile PDF
     */
    @Override
    public void visit(PDFResourceFile pdfResourceFile) {
        logger.info("PDF compressed");
    }

    /**
     * 针对PDF资源的业务统一接口
     *
     * @param pptResourceFile PPT
     */
    @Override
    public void visit(PPTResourceFile pptResourceFile) {
        logger.info("PPT compressed");
    }

    /**
     * 针对PDF资源的业务统一接口
     *
     * @param wordResourceFile Word
     */
    @Override
    public void visit(WordResourceFile wordResourceFile) {
        logger.info("Word compressed");
    }

    /*
    public void compress(PDFResourceFile pdfResourceFile) {
        logger.info("PDF compressed");
    }

    public void compress(PPTResourceFile pptResourceFile) {
        logger.info("PPT compressed");
    }

    public void compress(WordResourceFile wordResourceFile) {
        logger.info("Word compressed");
    }
    */
}
